package com.qfjy.homework.huangshijun;

/**
 * @author:hsj date:2022/6/29 19:43
 * @version:1.0
 * 创建实现接口的实体类,
 * 中间层类
 */
public class RealImage implements Image{

    private String fileName;

    public RealImage(String fileName){
        this.fileName = fileName;
        loadFromDisk(fileName);
    }

    private void loadFromDisk(String fileName) {
        System.out.println("Loading " + fileName);
    }

    @Override
    public void dsiplay() {
        System.out.println("Displaying " + fileName);
    }
}
